import Vue from 'vue'
import './plugins/axios'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import './plugins/element.js'
import Vuex from 'vuex'
import el from "element-ui/src/locale/lang/el";

Vue.use(Vuex);
Vue.use(ElementUI);
Vue.config.productionTip = false

//路有条转之前

/*router.beforeEach((to, from, next) => {
    let isLogin = sessionStorage.getItem('isLogin')
    // 登出
    if (to.path === '/Logout') {
        // 清空
        sessionStorage.clear();
        // 跳转 登录
        next({path: '/Login'})
    } else if (to.path === '/Login') {
        if (isLogin !== null && isLogin === '1') {
            next({path: '/Home'})
        }
    } else if (isLogin === null || isLogin !== '1') {
        // 跳转 登录
        next({path: '/Login'})
    }
})*/
// 设置axios的baseURL
//axios.defaults.baseURL = "http://182.92.125.77:8888/"

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
